.class public Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;
.super Lcom/philzhu/www/framework/impl/AndroidGame;
.source "ZZDouDiZhuActivity.java"


# instance fields
.field private dialog:Landroid/app/Dialog;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 17
    invoke-direct {p0}, Lcom/philzhu/www/framework/impl/AndroidGame;-><init>()V

    return-void
.end method

.method static synthetic access$0(Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;)Landroid/app/Dialog;
    .locals 1
    .parameter

    .prologue
    .line 18
    iget-object v0, p0, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->dialog:Landroid/app/Dialog;

    return-object v0
.end method

.method static synthetic access$1(Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 76
    invoke-direct {p0}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->back()V

    return-void
.end method

.method private back()V
    .locals 1

    .prologue
    .line 78
    iget-object v0, p0, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->dialog:Landroid/app/Dialog;

    if-eqz v0, :cond_0

    .line 80
    iget-object v0, p0, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->dialog:Landroid/app/Dialog;

    invoke-virtual {v0}, Landroid/app/Dialog;->dismiss()V

    .line 82
    :cond_0
    invoke-virtual {p0}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->finish()V

    .line 83
    return-void
.end method


# virtual methods
.method public getStartScreen()Lcom/philzhu/www/framework/Screen;
    .locals 1

    .prologue
    .line 22
    new-instance v0, Lcom/philzhu/www/ddz/LoadingScreen;

    invoke-direct {v0, p0}, Lcom/philzhu/www/ddz/LoadingScreen;-><init>(Lcom/philzhu/www/framework/Game;)V

    return-object v0
.end method

.method public keyBackHandle()V
    .locals 5

    .prologue
    .line 27
    invoke-virtual {p0}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f040038

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    .line 28
    .local v1, quitStr:Ljava/lang/String;
    invoke-virtual {p0}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f04003b

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    .line 29
    .local v2, yesStr:Ljava/lang/String;
    invoke-virtual {p0}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f04003c

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v0

    .line 30
    .local v0, noStr:Ljava/lang/String;
    new-instance v3, Landroid/app/AlertDialog$Builder;

    invoke-direct {v3, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    invoke-virtual {v3, v1}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    new-instance v4, Lcom/flyfish/moregames/ExitView;

    invoke-direct {v4, p0}, Lcom/flyfish/moregames/ExitView;-><init>(Landroid/content/Context;)V

    invoke-virtual {v4}, Lcom/flyfish/moregames/ExitView;->getView()Landroid/view/View;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/app/AlertDialog$Builder;->setView(Landroid/view/View;)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    .line 31
    new-instance v4, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity$1;

    invoke-direct {v4, p0}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity$1;-><init>(Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;)V

    .line 30
    invoke-virtual {v3, v2, v4}, Landroid/app/AlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    .line 39
    new-instance v4, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity$2;

    invoke-direct {v4, p0}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity$2;-><init>(Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;)V

    invoke-virtual {v3, v0, v4}, Landroid/app/AlertDialog$Builder;->setNegativeButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    .line 46
    invoke-virtual {v3}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v3

    .line 30
    iput-object v3, p0, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->dialog:Landroid/app/Dialog;

    .line 47
    iget-object v3, p0, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->dialog:Landroid/app/Dialog;

    invoke-virtual {v3}, Landroid/app/Dialog;->show()V

    .line 48
    return-void
.end method

.method public keyBackHandleOfGameScreen()V
    .locals 5

    .prologue
    .line 52
    invoke-virtual {p0}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f040039

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    .line 53
    .local v1, quitStr:Ljava/lang/String;
    invoke-virtual {p0}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f04003b

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    .line 54
    .local v2, yesStr:Ljava/lang/String;
    invoke-virtual {p0}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f04003c

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v0

    .line 55
    .local v0, noStr:Ljava/lang/String;
    new-instance v3, Landroid/app/AlertDialog$Builder;

    invoke-direct {v3, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v4, 0x7f020015

    invoke-virtual {v3, v4}, Landroid/app/AlertDialog$Builder;->setIcon(I)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    invoke-virtual {v3, v1}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    .line 56
    new-instance v4, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity$3;

    invoke-direct {v4, p0}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity$3;-><init>(Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;)V

    .line 55
    invoke-virtual {v3, v2, v4}, Landroid/app/AlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    .line 65
    new-instance v4, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity$4;

    invoke-direct {v4, p0}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity$4;-><init>(Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;)V

    invoke-virtual {v3, v0, v4}, Landroid/app/AlertDialog$Builder;->setNegativeButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    .line 72
    invoke-virtual {v3}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v3

    .line 55
    iput-object v3, p0, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->dialog:Landroid/app/Dialog;

    .line 73
    iget-object v3, p0, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->dialog:Landroid/app/Dialog;

    invoke-virtual {v3}, Landroid/app/Dialog;->show()V

    .line 74
    return-void
.end method

.method protected onDestroy()V
    .locals 0

    .prologue
    .line 134
    invoke-static {p0}, Lcom/philzhu/www/ads/AdsManager;->destroy(Landroid/content/Context;)V

    .line 135
    invoke-super {p0}, Lcom/philzhu/www/framework/impl/AndroidGame;->onDestroy()V

    .line 136
    return-void
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 3
    .parameter "keyCode"
    .parameter "event"

    .prologue
    const/4 v2, 0x1

    .line 88
    const/4 v1, 0x4

    if-ne p1, v1, :cond_3

    .line 90
    invoke-virtual {p0}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->getCurrentScreen()Lcom/philzhu/www/framework/Screen;

    move-result-object v1

    invoke-virtual {v1}, Lcom/philzhu/www/framework/Screen;->getScreenType()I

    move-result v0

    .line 91
    .local v0, currentScreenType:I
    const/4 v1, 0x2

    if-ne v0, v1, :cond_0

    .line 93
    invoke-virtual {p0}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->keyBackHandleOfGameScreen()V

    :goto_0
    move v1, v2

    .line 109
    .end local v0           #currentScreenType:I
    :goto_1
    return v1

    .line 95
    .restart local v0       #currentScreenType:I
    :cond_0
    const/4 v1, 0x5

    if-ne v0, v1, :cond_1

    move v1, v2

    .line 97
    goto :goto_1

    .line 99
    :cond_1
    if-ne v0, v2, :cond_2

    .line 101
    invoke-virtual {p0}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->keyBackHandle()V

    goto :goto_0

    .line 105
    :cond_2
    new-instance v1, Lcom/philzhu/www/ddz/MainMenuScreen;

    invoke-direct {v1, p0}, Lcom/philzhu/www/ddz/MainMenuScreen;-><init>(Lcom/philzhu/www/framework/Game;)V

    invoke-virtual {p0, v1}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;->setScreen(Lcom/philzhu/www/framework/Screen;)V

    goto :goto_0

    .line 109
    .end local v0           #currentScreenType:I
    :cond_3
    invoke-super {p0, p1, p2}, Lcom/philzhu/www/framework/impl/AndroidGame;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v1

    goto :goto_1
.end method

.method public submitHightScore(JLjava/lang/String;)V
    .locals 3
    .parameter "scoreValue"
    .parameter "leadboradId"

    .prologue
    .line 114
    new-instance v1, Lcom/openfeint/api/resource/Score;

    const/4 v2, 0x0

    invoke-direct {v1, p1, p2, v2}, Lcom/openfeint/api/resource/Score;-><init>(JLjava/lang/String;)V

    .line 115
    .local v1, s:Lcom/openfeint/api/resource/Score;
    new-instance v0, Lcom/openfeint/api/resource/Leaderboard;

    invoke-direct {v0, p3}, Lcom/openfeint/api/resource/Leaderboard;-><init>(Ljava/lang/String;)V

    .line 116
    .local v0, l:Lcom/openfeint/api/resource/Leaderboard;
    new-instance v2, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity$5;

    invoke-direct {v2, p0}, Lcom/philzhu/www/ddz/ZZDouDiZhuActivity$5;-><init>(Lcom/philzhu/www/ddz/ZZDouDiZhuActivity;)V

    invoke-virtual {v1, v0, v2}, Lcom/openfeint/api/resource/Score;->submitTo(Lcom/openfeint/api/resource/Leaderboard;Lcom/openfeint/api/resource/Score$SubmitToCB;)V

    .line 130
    return-void
.end method
